home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / MacHTTP 1.3 / MacHTTP Software / Documentation / AppleEvent & AppleScript Info / More Scripts / Remote MacHTTP Status < prev    next >
Encoding:
Text File  |  1994-05-02  |  958 b   |  21 lines  |  [TEXT/ToyS]

  1. --This script shows how to communicate with a MacHTTP server running on a 
  2. -- remote Mac. This script returns important stats about the health of the
  3. -- server and how many users it's served. It is intended to be used as a
  4. -- stand-alone "application" and not as a script executed by MacHTTP.
  5. --
  6. --You must change or delete the "machine" and "zone" arguments below as
  7. -- appropriate for your site.
  8.  
  9. tell application "MacHTTP" of machine "Some Mac" of zone "Some Zone"
  10.     set rep to Status Report
  11. end tell
  12. set AppleScript's text item delimiters to ","
  13. set connections to word 2 of text item 1 of rep
  14. set bytes to word 2 of text item 12 of rep as integer
  15. set bytes to round (bytes / 1024)
  16. set currMem to word 2 of text item 10 of rep
  17. set timeouts to word 2 of text item 8 of rep
  18. set output to "Connections: " & connections & "   Transmitted: " & bytes & "K" & return
  19. set output to output & "Memory: " & currMem & "   Timeouts: " & timeouts
  20. display dialog output
  21.